#include <iostream>
using namespace std;
const int N = 150;
int mp[N][N];
int ans[N][N];
int main()
{
    int n, m;
    cin >> n >> m;

    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
        {
            cin >> mp[i][j];
        }
    }
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
        { 
            if (mp[i][j] == 1)
            {
                ans[i][j] = 9;
                continue;
            }
        }

    }
    for (int i = 1; i <= n; )

        return 0;
}